home *** CD-ROM | disk | FTP | other *** search
- Subject: Re:FW_CCommand::DoIt
- Sent: 6/2/96 9:07 AM
- Received: 6/3/96 7:58 AM
- From: Greg Friedman, friedman@cognosis.com
- Reply-To: ODF Interest, ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
-
- At 1:45 AM 6/2/96, Hutchings Software Development wrote:> I noticed that
- FW_CCommand::DoIt is pure virtual. This caused a subtle
- > bug for me this evening because I didn't initially realize that my
- > override had
- > to call "SaveUndoState" to make it get called!
- >
- > So, I eventually lifted the following out of
- > FW_CClipboardCommand::DoIt.
- >
- > if (GetCanUndo(ev))
- > this->SaveUndoState(ev); // save current state,
- >for later Undo
- >
- > Would it be possible (for future release) to either move this to
- > FW_CCommand::Execute, or put it in FW_CCommand:DoIt? It took me a good
- > 15 minutes with MW Debug to figure out that I was missing those from
- > my DoIt override. If the undo/redo methods are defined in FW_CCommand,
- > why not wire them up too?
-
- Brad,
-
- I agree this is confusing. I'm not sure whether the answer is to have
- execute call SaveUndoState or to remove SaveUndoState from FW_CCommand.
- Since SaveUndoState isn't necessary for command processing, and it is often
- simpler to save undo state data in a DoIt implementation, I'm leaning
- towards removing it.
-
- gsf.
-
-
- _________________________________________________________
- Greg Friedman ODF Engineering Apple Computer
-
-